
import requests
import cookie
import 收件时间查询
import 推送补偿
data = {
    '_search': 'true',
    'nd': '1747709946814',
    'rows': '28000',
    'page': '1',
    'sidx': 'RECEIVE_TIME',
    'sord': 'desc',
    'receiveNumber': '',
    'applicant': '',
}
headers = cookie.headers
response = requests.post(
    'http://59.215.206.188/qstb/general/business/compensate/query',

    headers=headers,
    data=data,
).json()
list_RECEIVE_NUMBER=[]
for item in response['rows']:
    RECEIVE_NUMBER	= str(item['cell']['RECEIVE_NUMBER'])
    # print(RECEIVE_NUMBER)
    if RECEIVE_NUMBER.startswith("5203"):
        list_RECEIVE_NUMBER.append(item['cell']['RECEIVE_NUMBER'])
log_items = []
for item in list_RECEIVE_NUMBER:
    re=收件时间查询.query(item)
    if re[0] >("2025-06-10"):
        print(推送补偿.reput(re[1]),item)
        log_items.append(item)

import os
log_dir = os.path.join(os.path.dirname(__file__), '日志')
if not os.path.exists(log_dir):
    os.makedirs(log_dir)
with open(os.path.join(log_dir, 'log.txt'), 'a', encoding='utf-8') as f:
    f.write('\n'.join(log_items) + '\n')


